//
//  HomeBaseViewController.m
//  AoJi
//
//  Created by MinwenYi on 15-1-27.
//  Copyright (c) 2015年 xuanheng. All rights reserved.
//

#import "HomeBaseViewController.h"
#import "MainViewController.h"
@interface HomeBaseViewController ()

@end

@implementation HomeBaseViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
     [self initHeadView];
    [self hideNavigationBar];
    
   
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)initHeadView
{
    self.headerHeight=60;
   
    
    UIView  *headBgview=[[UIView alloc]initWithFrame:CGRectMake(0, 0, Mainwidth,self.headerHeight)];
    headBgview.backgroundColor=kheadBgcolor;
    [self.view addSubview:headBgview];
    UIButton *backBtn=[[UIButton alloc]initWithFrame:CGRectMake(-5,15, 50, 50)];
//    backBtn.backgroundColor=[UIColor yellowColor];
    [backBtn setImage:[UIImage imageNamed:@"fanhui@2x.png"] forState:UIControlStateNormal];
    [backBtn addTarget:self action:@selector(backUp) forControlEvents:UIControlEventTouchUpInside];
    [headBgview addSubview:backBtn];
    
//    backBtn.backgroundColor=[UIColor redColor];
    self.ctitleLabel=[[UILabel alloc]initWithFrame:CGRectMake(45, 20, Mainwidth-90, 40)];
    [headBgview addSubview:self.ctitleLabel];
    self.ctitleLabel.textAlignment=NSTextAlignmentCenter;
    
    
}
-(void)backUp
{

    
    [self.navigationController popViewControllerAnimated:YES];

}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
